<?php
namespace ZN\Database;

interface DBUserInterface
{	
	//----------------------------------------------------------------------------------------------------
	//
	// Yazar      : Ozan UYKUN <ozanbote@windowslive.com> | <ozanbote@gmail.com>
	// Site       : www.zntr.net
	// Lisans     : The MIT License
	// Telif Hakkı: Copyright (c) 2012-2016, zntr.net
	//
	//----------------------------------------------------------------------------------------------------
	
	//----------------------------------------------------------------------------------------------------
	// name()
	//----------------------------------------------------------------------------------------------------
	// 
	// @param string $name: USER()
	//
	//----------------------------------------------------------------------------------------------------
	public function name($name);
	
	//----------------------------------------------------------------------------------------------------
	// host()
	//----------------------------------------------------------------------------------------------------
	// 
	// @param string $host: localhost
	//
	//----------------------------------------------------------------------------------------------------
	public function host($host);
	
	//----------------------------------------------------------------------------------------------------
	// identifiedBy()
	//----------------------------------------------------------------------------------------------------
	// 
	// @param string $authString: empty
	//
	//----------------------------------------------------------------------------------------------------
	public function identifiedBy($authString);
	
	//----------------------------------------------------------------------------------------------------
	// identifiedByPassword()
	//----------------------------------------------------------------------------------------------------
	// 
	// @param string $hashString: empty
	//
	//----------------------------------------------------------------------------------------------------
	public function identifiedByPassword($hashString);

	//----------------------------------------------------------------------------------------------------
	// identifiedWith()
	//----------------------------------------------------------------------------------------------------
	// 
	// @param string $authPlugin: empty
	// @param string $type      : empty
	// @param string $authString: empty
	//
	//----------------------------------------------------------------------------------------------------
	public function identifiedWith($authPlugin, $type, $authString);
	
	//----------------------------------------------------------------------------------------------------
	// identifiedWithBy()
	//----------------------------------------------------------------------------------------------------
	// 
	// @param string $authPlugin: empty
	// @param string $authString: empty
	//
	//----------------------------------------------------------------------------------------------------
	public function identifiedWithBy($authPlugin, $authString);
	
	//----------------------------------------------------------------------------------------------------
	// identifiedWithAs()
	//----------------------------------------------------------------------------------------------------
	// 
	// @param string $hashPlugin: empty
	// @param string $hashString: empty
	//
	//----------------------------------------------------------------------------------------------------
	public function identifiedWithAs($hashPlugin, $hashString);
	
	//----------------------------------------------------------------------------------------------------
	// required()
	//----------------------------------------------------------------------------------------------------
	// 
	// @param void
	//
	//----------------------------------------------------------------------------------------------------
	public function required();
	
	//----------------------------------------------------------------------------------------------------
	// with()
	//----------------------------------------------------------------------------------------------------
	// 
	// @param void
	//
	//----------------------------------------------------------------------------------------------------
	public function with();
	
	//----------------------------------------------------------------------------------------------------
	// encode()
	//----------------------------------------------------------------------------------------------------
	// 
	// @param string $type     : SSL, X509, CIPHER value, ISSUER value, SUBJECT value 
	// @param string $string   : empty value
	// @param string $condition: and, or
	//
	//----------------------------------------------------------------------------------------------------
	public function encode($type, $string, $condition);
	
	//----------------------------------------------------------------------------------------------------
	// resource()
	//----------------------------------------------------------------------------------------------------
	// 
	// @param string $resource: query       => MAX_QUERIES_PER_HOUR
	//						    update 		=> 'MAX_UPDATES_PER_HOUR
	//						    connection 	=> 'MAX_CONNECTIONS_PER_HOUR
	//						    user 		=> 'MAX_USER_CONNECTIONS
	// @param string $count   : 0
	//
	//----------------------------------------------------------------------------------------------------
	public function resource($resource, $count);
	
	//----------------------------------------------------------------------------------------------------
	// passwordExpire()
	//----------------------------------------------------------------------------------------------------
	// 
	// @param string  $type: empty, DEFAULT, NEVER, INTERVAL
	// @param numeric $n   : 0
	//
	//----------------------------------------------------------------------------------------------------
	public function passwordExpire($type, $n);
	
	//----------------------------------------------------------------------------------------------------
	// lock()
	//----------------------------------------------------------------------------------------------------
	// 
	// @param string  $type: lock, unlock
	//
	//----------------------------------------------------------------------------------------------------
	public function lock($type);
	
	//----------------------------------------------------------------------------------------------------
	// unlock()
	//----------------------------------------------------------------------------------------------------
	// 
	// @param string  $type: unlock, lock
	//
	//----------------------------------------------------------------------------------------------------
	public function unlock($type);
	
	//----------------------------------------------------------------------------------------------------
	// type()
	//----------------------------------------------------------------------------------------------------
	// 
	// @param string  $type: TABLE, FUNCTION, PROCEDURE
	//
	//----------------------------------------------------------------------------------------------------
	public function type($type);
	
	//----------------------------------------------------------------------------------------------------
	// select()
	//----------------------------------------------------------------------------------------------------
	// 
	// @param string  $select: *.*
	//
	//----------------------------------------------------------------------------------------------------
	public function select($select);
	
	//----------------------------------------------------------------------------------------------------
	// grantOption()
	//----------------------------------------------------------------------------------------------------
	// 
	// @param void()
	//
	//----------------------------------------------------------------------------------------------------
	public function grantOption();
	
	//----------------------------------------------------------------------------------------------------
	// alter()
	//----------------------------------------------------------------------------------------------------
	// 
	// @param string  $name: USER()
	//
	//----------------------------------------------------------------------------------------------------
	public function alter($name);
	
	//----------------------------------------------------------------------------------------------------
	// create()
	//----------------------------------------------------------------------------------------------------
	// 
	// @param string  $name: USER()
	//
	//----------------------------------------------------------------------------------------------------
	public function create($name);
	
	//----------------------------------------------------------------------------------------------------
	// drop()
	//----------------------------------------------------------------------------------------------------
	// 
	// @param string  $name: USER()
	//
	//----------------------------------------------------------------------------------------------------
	public function drop($name);
	
	//----------------------------------------------------------------------------------------------------
	// grant()
	//----------------------------------------------------------------------------------------------------
	// 
	// @param string  $name  : ALL
	// @param string  $type  : *.*
	// @param string  $select: *.*
	//
	//----------------------------------------------------------------------------------------------------
	public function grant($name, $type, $select);
	
	//----------------------------------------------------------------------------------------------------
	// revoke()
	//----------------------------------------------------------------------------------------------------
	// 
	// @param string  $name  : ALL
	// @param string  $type  : *.*
	// @param string  $select: *.*
	//
	//----------------------------------------------------------------------------------------------------
	public function revoke($name, $type, $select);
	
	//----------------------------------------------------------------------------------------------------
	// rename()
	//----------------------------------------------------------------------------------------------------
	// 
	// @param string  $oldName: empty
	// @param string  $newName: empty
	//
	//----------------------------------------------------------------------------------------------------
	public function rename($oldName, $newName);
	
	//----------------------------------------------------------------------------------------------------
	// setPassword()
	//----------------------------------------------------------------------------------------------------
	// 
	// @param string  $user: empty
	// @param string  $pass: empty
	//
	//----------------------------------------------------------------------------------------------------
	public function setPassword($user, $pass);
}